﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace PloobsEngine.Modelo
{
    public enum BatchType
    {
        INDEXED,NORMAL
    }


    public class BatchInformation
    {
        public BatchInformation(int BaseVertex, int NumVertices, int PrimitiveCount, int StartIndexOrVertex, int StreamOffset, VertexDeclaration VertexDeclaration, int VertexStride, BatchType BatchType)
        {
            this.BaseVertex = BaseVertex;
            this.NumVertices = NumVertices;
            this.PrimitiveCount = PrimitiveCount;            
            this.StreamOffset = StreamOffset;
            this.VertexDeclaration = VertexDeclaration;
            this.VertexStride = VertexStride;
            this.BatchType = BatchType;
            if (BatchType == BatchType.INDEXED)
            {
                this.StartIndex = StartIndexOrVertex;
            }
            else
            {
                this.StartVertex = StartIndexOrVertex;
            }
        }
        
        public BatchInformation(int BaseVertex,int NumVertices,int PrimitiveCount,int StartIndex,int StreamOffset,VertexDeclaration VertexDeclaration,int VertexStride)
        {
            this.BaseVertex = BaseVertex;
            this.NumVertices = NumVertices;
            this.PrimitiveCount = PrimitiveCount;
            this.StartIndex = StartIndex;
            this.StreamOffset = StreamOffset;
            this.VertexDeclaration = VertexDeclaration;
            this.VertexStride = VertexStride;
            this.BatchType = BatchType.INDEXED;
        }

        public BatchType BatchType;

        public int BaseVertex;

        public int NumVertices;

        public int PrimitiveCount;

        public int StartIndex;

        public int StartVertex;

        public int StreamOffset;

        public VertexDeclaration VertexDeclaration;

        public int VertexStride;
        
    }
}
